Ext.ux.ViewLogger = Ext.extend(Ext.Window, {
	idString:'',
	initComponent : function(config) {
		var linedata = Ext.getCmp(this.idString).getStore()
				.getAt(Ext.getCmp(this.idString).getSelectionModel().lastActive);
		
		var modifyForm = new Ext.FormPanel({
        	labelWidth : 100, // label settings here cascade unless overridden
			autoScroll:true,
			frame : true,
			region : 'center',
			border:true,
			fileUpload: true,
			bodyStyle : 'padding:5px 5px 0',
			width : '100%',
			defaults : {
				width : 220
			},
			defaultType : 'textfield',

			items : [{
				fieldLabel : '操作对象',
				id:'loggerTargetView',
				editable:false,
				allowBlank : false
			},{
				fieldLabel : '操作时间',
				id:'loggerDateView',
				allowBlank : false
			},{
				anchor:'95%',
				fieldLabel : '内容',
				xtype:'textarea',
				id:'loggerDoView',
				height:300,
				allowBlank : false,
				autoScroll:true
			}]
		});
		
		Ext.getCmp("loggerTargetView").setValue(linedata.json.target);
    	Ext.getCmp("loggerDateView").setValue(linedata.json.createDate);
		Ext.getCmp("loggerDoView").setValue(linedata.json.doWhat);
		
		Ext.apply(this, {
			title: "查看留言信息",
	        plain: true,
	        width:1000,
	        height:600,
	        modal: true,
	        maximizable:true,
	        border: false,
	        layout: 'border',
	        autoScroll:true,
	        items: [modifyForm]
		});
		Ext.ux.ViewLogger.superclass.initComponent.apply(this, arguments);
	}
});
Ext.reg('lgnViewLogger', Ext.ux.ViewLogger);
